<template>
	<up-modal :show="show" @confirm="handleConfirm" @cancel="handleCancel" @close="close" ref="uModal" closeOnClickOverlay showCancelButton :asyncClose="true">
		<template #confirmButton>
			1111
		</template>
	</up-modal>
</template>

<script setup>
import { ref } from 'vue';

const props = defineProps({
	title: {
		type: String,
		default: ''
	}
})
	
	const emits = defineEmits(['onConfirm', 'onCancel'])
	const show = ref(false)
	
	const open = (callback = () => {}) => {
		callback();
		show.value = true;
	}
	
	const close = (callback = () => {}) => {
		callback();
		show.value = false;
	}
	
	const handleCancel = () => {
		emits('onCancel')
	}
	
	const handleConfirm = () => {
		emits('onConfirm')
	}
</script>

<style lang="scss">

</style>